package com.yurun.loginmodule;

import com.tendcent.face.sdk.TdxSdkBootstrap;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.oas.annotations.EnableOpenApi;

@SpringBootApplication
@ComponentScan(basePackages = {"com.yurun"})
@MapperScan(basePackages =
        {
                "com.yurun.loginmodule.mapper",
                "com.yurun.dictionarymodule.mapper",
                "com.yurun.employeemodule.mapper",
                "com.yurun.orgbranch.mapper",
                "com.yurun.orgclassroommodule.mapper",
                "com.yurun.orglessonmodule.mapper",
                "com.yurun.orgpermissionmodule.mapper",
                "com.yurun.orgstudentmodule.mapper",
                "com.yurun.organizationmodule.mapper",
                "com.yurun.teacherorgmodule.mapper",
                "com.yurun.orgparentmodule.mapper"
        })
@EnableOpenApi
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
@EnableScheduling
public class LoginModuleApplication {

    public static void main(String[] args) {
        SpringApplication.run(LoginModuleApplication.class, args);
        // SDK初始化
        // 如果SDK调用是在tomcat容器或其它web容器中，请使用单独线程初始化。
        // 否则将对主线程阻塞导致web项目无法正常运行
        new Thread(() -> TdxSdkBootstrap.start(10022)).start();
    }

}
